{% extends "base.html" %}
{% import "include/_page.html" as macros %}

{% block title %}用户列表{% endblock %}

{% block body_content %}
    <div class="col-sm-offset-6 col-sm-6">
<h2>用户列表</h2>
        </div>
    {% if users %}
        <table class="table table-bordered table-striped table-hover">
        <thead>
        <tr>
          <th>ID</th>
          <th>用户名</th>
          <th>邮箱</th>
          <th>注册时间</th>
        </tr>
      </thead>
      <tbody>
        {% for user in users %}
            <tr>
                <td>{{ user.id }}</td>
                <td>{{ user.username }}</td>
            <td>{{ user.email }}</td>
            <td>{{ user.create_time }}</td>
            </tr>
        {% endfor %}
        </tbody>
        </table>
    {% endif %}
{% if pagination %}
<div class="pagination">
    {{ macros.render_page(pagination, '.index', fragment='#page') }}
</div>
{% endif %}
{% endblock %}